package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.domain.entity.Replace;
import com.ruoyi.system.mapper.ReplaceMapper;
import com.ruoyi.system.service.ReplaceService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author: ruohao
 * @Date: 2023/9/17
 **/
@Service
public class ReplaceServiceImpl implements ReplaceService {
    @Resource
    private ReplaceMapper replaceMapper;

    @Override
    public List<Replace> selectList(Replace replace) {
        return replaceMapper.selectReplaceList(replace);
    }

    @Override
    public Replace selectById(Long id) {
        return replaceMapper.selectById(id);
    }

    @Override
    public Boolean create(Replace replace) {
        return replaceMapper.insertReplace(replace) == 1;
    }

    @Override
    public Boolean update(Replace replace) {
        return replaceMapper.updateReplace(replace) == 1;
    }

    @Override
    public Boolean deleteById(Long id) {
        return replaceMapper.deleteById(id) == 1;
    }
}
